﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH5_2010A.Shopping.DTO
{
    /// <summary>
    /// 创建订单的DTO
    /// </summary>
    public class OrderInputDto
    {
        //订单主表信息
        
        [Required]
        public Guid MemberID { get; set; }


        [Required]
        public decimal OrderAccount { get; set; }


        [Required]
        public string RecivedName { get; set; }


        [Required]
        public string RecivedPhone { get; set; }


        [Required]
        public string RecivedAddress { get; set; }

        //订单明细信息

        [Required]
        public List<OrderDetailInputDto> Details { get; set; }
    }

    public class OrderDetailInputDto
    {
        [Required]
        public Guid ProductId { get; set; }
        public string? ProductName { get; set; }


        [Required]
        public decimal ProductPrice { get; set; }


        [Required]
        public int ProducuNumber { get; set; }
    }
}
